<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/11 011
 * Time: 9:55
 */
namespace App\Http\Controllers;

use App\Pizza\ChicagoPizzaStore;
use App\Pizza\NYPizzaStore;
use App\Pizza\Pizza;

class PizzaController
{
    public function index()
    {
        $nyStore = new NYPizzaStore();
        $chicagoStore = new ChicagoPizzaStore();

        $pizza = $nyStore->orderPizza("cheese");
        echo ("Ethan ordered a " . $pizza->getName() . "<br />" );
        echo ("<br />" );

        $pizza = $chicagoStore->orderPizza("cheese");
        echo ("Joel ordered a " . $pizza->getName() . "<br />" );
        echo ("<br />" );

        $pizza = $chicagoStore->orderPizza("veggie");
        echo ("Joel ordered a " . $pizza->getName() . "<br />" );
    }
}